{% load static %}
{% load mediapath %}

<html lang="ru">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>{{ title }}</title>
    <!-- Bootstrap core CSS -->
    <link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="{% static 'css/bootstrap-grid.css' %}" rel="stylesheet">
</head>
<body>
<div class="container">
    <div id="navigation">
        <ul>
            <li><a href="/" class="active">Главная</a></li>
            <li><a href="/admin">Админ панель</a></li>
        </ul>
    </div>

    <div id="content">
        <h3>Записи</h3>
        {% for post in post_list %}
        <div class="projects">
            <div class="item">
                <div class="image left">
                    <img src="{{ post.images|mediapath }}" width="480" height="300" alt="">
                </div>
                <div class="text left">
                    <h4><a href="{{ post.id }}">{{ post.heading }}</a></h4>
                    <p>{{ post.blog_body }}</p>
                    <p>{{ post.date_publication }}</p>
                    <p>Автор: {{ post.author }} </p>
                </div>
                <div class="cl"></div>
            </div>
        </div>
        {% endfor %}
    </div>
    <div class="cl"></div>
</div>

<div id="footer">
    <p class="copy right">Copyright @ 2023 </p>
</div>
</body>
</html>
